package com.bitnei.battery.examples;

import com.bitnei.battery.bean.dataBean.recover.RecStorage;
import com.bitnei.battery.constants.BatterySpecies;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: wang
 * @Date: 2019/10/16 9:47
 * @Version 1.0
 * Description: 回收网点入库示例
 */
public class RecoverStoExample {


    public static void main(String[] args){
        //请求地址
        String url = "http://127.0.0.1:8999/bitnei/v1.0/battery/recover/receiveRecoverStorage";
        //组装数据
        List<RecStorage> stoBatList = mockStoBat();
        //调用接口
        ApiUtilExample.callApi(url,stoBatList);
    }


    /**
     * 模拟回收网点入库数据
     * @return
     */
    private static List<RecStorage> mockStoBat(){
        List<RecStorage> stoBatList = new ArrayList<>();
        RecStorage stoBat = new RecStorage();

        stoBat.setCode("101PE00000");
        stoBat.setBatterySpecies(BatterySpecies.P.getCode());
        stoBat.setStorageDate("2018-04-10");
        stoBat.setRecoverUnitCode("91430111MA4L16XXXX");
        stoBat.setRecoverUnitName("回收网点企业");
        return stoBatList;
    }

}
